package com.mybook.allbook.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {
    @GetMapping("/index")
    public String toIndex(){
        return "ems/login";
    }

    @GetMapping("/toRegister")
    public String toRegister(){
        return "ems/regist";
    }

    @GetMapping("/toSave")
    public String toSave(){
        return "ems/addEmp";
    }

    @GetMapping("/toUpdate")
    public String toUpdate(){
        return "ems/updateEmp";
    }

    @GetMapping("/index2")
    public String toIndex2(){
        return "ems/login2";
    }

    @GetMapping("/reported")
    public String reported(){ return "ems/report"; }

    @GetMapping("/jubao")
    public String jubao(){ return "ems/jubao"; }

    @GetMapping("/fankui")
    public String fankui(){ return "ems/fankui"; }

    @GetMapping("/zhuye")
    public String zhuye(){ return "ems/index"; }

    @RequestMapping("/user")
    public String to1(Model model)
        {
            String url = "/ems/emp/findAll2";
            model.addAttribute("url",url);
            return "ems/index";
        }


    @RequestMapping("/shijian")
    public String to2(Model model)
    {
        String url = "/ems/emp/mytime";
        model.addAttribute("url",url);
        return "ems/index";
    }

    @RequestMapping("/webdb")
    public String to3(Model model)
    {
        String url = "/ems/emp/web";
        model.addAttribute("url",url);
        return "ems/index";
    }

    @RequestMapping("/kefudb")
    public String to4(Model model)
    {
        String url = "/ems/emp/kefu";
        model.addAttribute("url",url);
        return "ems/index";
    }



}
